package com.example.designpattern.creational.factory.abstract_factory.leetcode_problem;

import com.example.designpattern.creational.factory.abstract_factory.leetcode_problem.factory.IFactory;
import com.example.designpattern.creational.factory.abstract_factory.leetcode_problem.factory.N95MaskFactory;
import com.example.designpattern.creational.factory.abstract_factory.leetcode_problem.factory.SurgicalMaskFactory;
import org.junit.Test;

/**
 * 练习题
 */
public class Client {

    @Test
    public void test() {
        IFactory surgicalMaskFactory = new SurgicalMaskFactory();
        // 输出：这是医用口罩
        System.out.println(surgicalMaskFactory.create());
        IFactory N95MaskFactory = new N95MaskFactory();
        // 输出：这是 N95 口罩
        System.out.println(N95MaskFactory.create());
    }
}